package com.ly.service;

import com.ly.dao.FoodDao;
import com.ly.entity.Food;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class FoodServiceImpl implements FoodService{

    @Autowired
    private FoodDao foodDao;


    @Override
    public List<Map> queryAll(Food food) {
        return foodDao.queryAll(food);
    }

    @Override
    public void addFood(Food food) {
        foodDao.addFood(food);
    }

    @Override
    public void updateFood(Food food) {
        foodDao.updateFood(food);
    }

    @Override
    public void deleteFood(int id) {
        foodDao.deleteFood(id);
    }
}
